@extends('front.common.header')

@section('title', '举报中心')

@section('header')
    @parent
@stop
@section('content')
<link  rel="stylesheet" type="text/css" href="{{ asset('/css/common/report.css') }}" >
<div class="main">
    <form id="reportForm">
    <div class="report-main">
        <div class="report-title">青苜举报中心</div>
        <div>
            <input type="hidden" name="reson_type" value="{{$report_type}}">
            <input type="hidden" name="app" value="{{$app}}">
            <input type="hidden" name="app_id" value="{{$app_id}}">
            <input type="hidden" name="url" value="{{$url}}">
            <input type="hidden" name="report_uid" value="{{$result->user_id}}">
            {{ csrf_field() }}
            <div class="report-step @if($report_type == 2) hide @endif" id="home-tab">
                <div class="report-step-step" id="step1_ti_cursor">
                    <img src="{{asset('/images/front/employ/step-1-cursor.png')}}">
                    <div class="step-number-cursor">1</div>
                    <div class="step-writing-cursor">填写举报信息</div>
                </div>
                <div class="report-step-step hide" id="step1_ti">
                    <img src="{{asset('/images/front/employ/step-1.png')}}">
                </div>
                <div class="report-step-step margin-left-020" id="step2_ti">
                    <img src="{{asset('/images/front/employ/step-2.png')}}">
                    <div class="step-number-2">2</div>
                    <div class="step-writing-2">确认举报信息</div>
                </div>
                <div class="report-step-step hide margin-left-020" id="step2_ti_cursor">
                    <img src="{{asset('/images/front/employ/step-2-cursor.png')}}">
                    <div class="step-number-2-cursor">2</div>
                    <div class="step-writing-2-cursor">确认举报信息</div>
                </div>
                <div class="report-step-step margin-left-020" id="step3_ti">
                    <img src="{{asset('/images/front/employ/step-end.png')}}">
                    <div class="step-number-3">3</div>
                </div>
                <div class="report-step-step hide margin-left-020" id="step3_ti_cursor">
                    <img src="{{asset('/images/front/employ/step-end-cursor.png')}}">
                    <div class="step-number-3-cursor">3</div>
                </div>
            </div>
            <div class="report-step @if($report_type == 1) hide @endif" id="profile-tab">
                <div class="report-step-step" id="p_step1_ti_cursor">
                    <img src="{{asset('/images/front/employ/step-1-cursor.png')}}">
                    <div class="step-number-cursor">1</div>
                    <div class="step-writing-cursor">填写举报信息</div>
                </div>
                <div class="report-step-step hide" id="p_step1_ti">
                    <img src="{{asset('/images/front/employ/step-1.png')}}">
                </div>
                <div class="report-step-step margin-left-020" id="p_step2_ti">
                    <img src="{{asset('/images/front/employ/step-end.png')}}">
                    <div class="step-number-3">2</div>
                </div>
                <div class="report-step-step hide margin-left-020" id="p_step2_ti_cursor">
                    <img src="{{asset('/images/front/employ/step-end-cursor.png')}}">
                    <div class="step-number-3-cursor">2</div>
                </div>
            </div>
        </div>
        <div class="clearfix mt-20 padd-l-15">
            <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class="@if($report_type == 1) active @endif"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">个人／企业举报</a></li>
                <li role="presentation" class="@if($report_type == 2) active @endif"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">垃圾信息举报</a></li>
            </ul>
        </div>
        <div class="tab-content">
            <div role="tabpanel" class="report-content tab-pane @if($report_type == 2) active @endif" id="profile">
                <div class="report-content" id="p_step1">
                    @foreach($reptypes as $key=>$rtps)
                    <div  class="report-info">
                        <label><input type="radio" name="report_type_2" value="{{$key}}" @if($key == 1) checked @endif>&nbsp;&nbsp;{{$rtps}}</label> 
                    </div>
                    @endforeach
                    <div class="report-code">
                        <span class="">输入验证码：</span>
                        <span><input type="text" name="verfy_code_2" class="verfy-code"></span>
                        <span><img src="{{ url('captcha') }}" onclick="this.src='{{ url('captcha') }}?r='+Math.random();" alt=""></span>
                        <span class="change-verfy"><a href="javascript:void(0)" onclick="replaceCaptcha(this)">看不清换一组</a></span>
                    </div>
                </div>
                <div class="report-content hide" id="p_step2">
                    <div class="report-finished">
                        <p class="first-row">
                            <img alt="" src="{{asset('/images/front/employ/report-success.png')}}">
                            举报信息提交成功
                        </p>
                        <p class="second-row">系统已将你上传得资料进行加密保存</p>
                        <p class="last-row">我们将依据相关法律及投诉处理原则进行判断处理，并在24小时之内通过通知或邮件告知处理结果，感谢您的反馈。 </p>
                    </div>
                </div>
                <div class="go-next-btn clearfix" id="p_step1_btn">
                    <div class="btn-group clearfix">
                        <div class="btn-next btn-green float-r" onclick="reportStep('p_step1','p_step2','{{url('/member/report')}}')">下一步</div>
                    </div>
                </div>
                <div class="go-next-btn hide clearfix"  id="p_step2_btn">
                    <div class="btn-group clearfix">
                        <div class="btn-next btn-close float-r"><a href="{{$url}}">关闭本页</a></div>
                    </div>
                </div>
            </div>
            <div role="tabpanel" class="report-content tab-pane @if($report_type == 1) active @endif" id="home">
                <div class="report-content" id="step1">
                    <div  class="report-info">
                        <label><input type="radio" name="report_type" value="1" checked>&nbsp;&nbsp;个人攻击</label> 
                        <div class="report-type-info">
                            <p>帖子中包含的文字，链接，图片和视频包含如下内容：</p>
                            <p>（ 1 ）、对个人辱骂信息</p>
                            <p>（ 2 ）、透露真实的个人信息，如：姓名、身份证号、银行卡号、护照号</p>
                        </div>
                    </div>
                    <div class="report-info">
                        <label><input type="radio" name="report_type" value="2">&nbsp;&nbsp;企业诽谤</label> 
                        <div class="report-type-info">
                            <p>帖子中包含的文字，链接，图片和视频包含如下内容：</p>
                                <p>（ 1 ）、对企业、企业员工和产品进行纯辱骂</p>
                                <p>（ 2 ）、对企业进行贬损的内容</p>
                                <p>（ 3 ）、有关企业的虚假信息或客户内部资料</p>
                                <p>（ 4 ）、企业管理及家属隐私、淫秽、垃圾的信息</p>
                        </div>
                    </div>
                </div>
                <div class="report-content hide" id="step2">
                    <div class="help-block">请再次确认您的举报信息，如需要修改举报内容，可返回上一步</div>
                    <div class="report-resource-title">我举报的信息：</div>
                    <div class="report-resource clearfix">
                        <div class="float-l user-info">
                            <div class="user-info-avatar"><img src="{{userlogo($result->user->id,'middle')}}" width="80" height="80"></div>
                            <div class="user-info-name">{{ $result->user->name }}</div>
                        </div> 
                        <div class="float-l report-resource-content">
                            <div>{{empty($result->title)?$result->name:$result->title}}</div>
                            <div class="mt-20">
                                {!! strip_tags($result->description) !!}
                            </div>
                            
                        </div>
                    </div>
                    <div class="report-code">
                        <span class="">输入验证码：</span>
                        <span><input type="text" name="verfy_code" class="verfy-code"></span>
                        <span><img src="{{ url('captcha') }}" onclick="this.src='{{ url('captcha') }}?r='+Math.random();" alt=""></span>
                        <span class="change-verfy"><a href="javascript:void(0)" onclick="replaceCaptcha(this)">看不清换一组</a></span>
                    </div>
                </div>
                <div class="report-content hide" id="step3">
                    <div class="report-finished">
                        <p class="first-row">
                            <img alt="" src="{{asset('/images/front/employ/report-success.png')}}">
                            举报信息提交成功
                        </p>
                        <p class="second-row">系统已将你上传得资料进行加密保存</p>
                        <p class="last-row">我们将依据相关法律及投诉处理原则进行判断处理，并在24小时之内通过通知或邮件告知处理结果，感谢您的反馈。 </p>
                    </div>
                </div>
                <div class="go-next-btn clearfix" id="step1_btn">
                    <div class="btn-group clearfix">
                        <div class="btn-next btn-green float-r" onclick="reportStep('step1','step2','')">下一步</div>
                    </div>
                </div>
                <div class="go-next-btn hide clearfix"  id="step2_btn">
                    <div class="btn-group clearfix">
                        <div class="btn-prev float-l"><a href="javascript:void(0)" onclick="reportStep('step2','step1','')"  >上一步</a></div>
                        <div class="btn-next btn-green float-r" onclick="reportStep('step2','step3','{{url('/member/report')}}')">下一步</div>
                    </div>
                </div>
                <div class="go-next-btn hide clearfix"  id="step3_btn">
                    <div class="btn-group clearfix">
                        <div class="btn-next btn-close float-r"><a href="{{$url}}">关闭本页</a></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    </form>
</div>
<link href="{{ asset('/addons/icheck-1.x/skins/flat/blue.css') }}" rel="stylesheet">
<script src="{{ asset('/addons/icheck-1.x/icheck.min.js') }}" type="text/javascript"></script>
<script type="text/javascript">
<!--
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
	  var href = $(this).attr("href");
	  if($(href+"-tab").hasClass('hide')){
    	  $(href+"-tab").removeClass('hide');
    	  $(href+"-tab").parent().find(".report-step").addClass('hide');
    	  $(href+"-tab").removeClass('hide');
	  }
	  if(href == "#home"){
		  $("input[name=reson_type]").val(1);
	  }else{
		  $("input[name=reson_type]").val(2);
	  }
	  
});
$('input').iCheck({
	checkboxClass: 'icheckbox_flat-blue',
    radioClass: 'iradio_flat-blue',
    increaseArea: '-10' // optional
});
function replaceCaptcha(id)
{
	var url = "{{ url('captcha') }}?r="+Math.random();
	$(id).parent().parent().find('img').attr('src',url);
}
//-->
</script>
@stop

<!-- 底部块 -->
@section('footer')
    @parent
@stop